const moment = require('moment');

module.exports = (sequelize, DataTypes) => sequelize.define('users', {
  name: {
    field: 'name',
    allowNull: true,
    type: DataTypes.STRING,
  },
  username: {
    field: 'username',
    allowNull: true,
    type: DataTypes.STRING,
  },
  password: {
    field: 'password',
    allowNull: true,
    type: DataTypes.STRING,
  },
  enterprise_id: {
    field: 'enterprise_id',
    allowNull: true,
    type: DataTypes.INTEGER,
  },
  birthday: {
    field: 'birthday',
    allowNull: true,
    type: DataTypes.DATE,
  },
  openid: {
    field: 'openid',
    allowNull: true,
    type: DataTypes.STRING,
  },
  createdAt: {
    field: 'createdAt',
    allowNull: true,
    type: DataTypes.DATE,
  },
  updatedAt: {
    field: 'updatedAt',
    allowNull: true,
    type: DataTypes.DATE,
  },
});
